<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>注册结果页</title>
    <jsp:include page="../common/common_css.jsp" flush="true"/>

</head>
<body>
<h1 style="width:100%;text-align: center;position: fixed;top: 50%;transform: translateY(-50%)">
    注册成功！${register_result.user.username}！ <span id="second">3</span>秒后跳转至 <a
        href="${pageContext.request.contextPath}/user/list">用户列表页面</a>
</h1>

<script>
    var second = 3;
    var timer = setInterval(function () {

        if (second <= 0) {
            clearInterval(timer);
            window.location.href = "${pageContext.request.contextPath}/user/list";
        }

        second--;

        document.getElementById("second").innerHTML = second;

    }, 1000);
</script>
</body>
</html>
